<!--搜索与重置-->
<template>
  <div class="row items-center justify-start q-mb-md">
    <slot name="left" />
    <q-item class="col-xl-2 col-md-3 col-sm-6 col-xs-12 q-pr-sm">
      <q-item-label class="col-12 text-right row no-wrap justify-center">
        <q-btn unelevated label="查询" no-wrap color="primary" class="q-mr-sm no-border-radius" :loading="loading" @click="searchForm.toQuery">
          <template v-slot:loading>
            <q-spinner-ios class="on-center" />
          </template>
        </q-btn>
        <q-btn outline unelevated label="重置" no-wrap class="q-mr-sm no-border-radius" color="secondary" @click="searchReset" />
        <q-btn-dropdown v-model="showQuery" persistent dense flat color="primary" :label="tableLabel" @before-show="show" @before-hide="hide"></q-btn-dropdown>
      </q-item-label>
    </q-item>
  </div>
</template>
<script>
import { IndexMixin } from 'boot/mixins'
export default {
  mixins: [IndexMixin],
  props: {
    itemClass: {
      type: String,
      required: false,
      default: ''
    }
  },
  methods: {
    show () {
      this.showQuery = true
      this.queryLabel = '收起'
    },
    hide () {
      this.showQuery = false
      this.queryLabel = '展开'
    }
  }
}
</script>
